package com.jswzc.boot.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by user on 2017/6/11.
 */
@RestController
@RequestMapping("/index")
public class IndexController {
    @RequestMapping(value = "sayHi/{id}/{name}")
    public Map<String,Object> sayHi(@PathVariable String name,@PathVariable int id){
        Map<String,Object> parm=new HashMap<>();
        parm.put("id",id);
        parm.put("name",name);
        parm.put("date",new Date());
        return parm;
    }
}
